﻿#include "Shared.fxh"

float4 passthrough_vs( float4 iPos : POSITION ) : POSITION
{
	return mul( iPos, MatMvp );
}

float4 solid_ps( uniform float4 color ) : COLOR0
{
	return color;
}

technique DeepWires
{
	pass DepthPrepass
	{
		VertexShader = compile vs_2_0 passthrough_vs();
		PixelShader = compile ps_2_0 solid_ps( 0.1 );
	
		ZEnable = True;
		ZWriteEnable = True;
		ZFunc = LessEqual;
		
		AlphaBlendEnable = False;
		AlphaTestEnable = False;
	}

	pass ZPass
	{
		VertexShader = compile vs_2_0 passthrough_vs();
		PixelShader = compile ps_2_0 solid_ps( 1 );

		FillMode = Wireframe;

		SlopeScaleDepthBias = -0.01;
		DepthBias = -0.0001;

		ZFunc = LessEqual;
	}
	
	pass reset
	< bool IsResetPass = true; >
	{
		FillMode = Solid;
		SlopeScaleDepthBias = 0;
		DepthBias = 0;
	}
}